<?php
/**
 * Created by PhpStorm.
 * User: 87393
 * Date: 2019-03-27
 * Time: 11:08
 */

namespace App\Http\Controllers\Admin\View;


use App\Http\Controllers\Controller;
use App\Http\Repositories\Services\IPermission;
use Illuminate\Support\Facades\Auth;

class HomeController extends Controller
{
    protected $permissionService;

    public function __construct(IPermission $permissionService)
    {
        $this->permissionService = $permissionService;
    }

    public function layout(){
        //$name = Auth::user()->name;
        $name = '';
        $tree = $this->permissionService->getTree();
        return view('admin.index.layout',compact('name','tree'));
    }

    public function body(){
        return view('admin.index.body');
    }
}